package BNS.plumbing;

import java.rmi.Remote;
import java.rmi.RemoteException;
//import java.rmi.server.UnicastRemoteObject;

/** This class is involved with registering clients and players.
	It carries out the mechanics of starting and stopping experiments (aka games).
	It is not involved in the actual execution of graph play dynamics.
	*/
public interface SessionHostInterface extends Remote {
	
	/** Must be called by the client to gain entry to the game.
		@return a ClientLiaison object that will conduct all communications with the server
		*/
	public ClientLiaisonInterface register(String clientName) throws RemoteException;
	
	/** Used (rarely) as a channel for the client to announce problems to the server.
		Intended as an aid to diagnose communication problems or for debugging.
		*/
	public void complain(int clientID, String message) throws RemoteException;
	
	/** Used for the client to announce its imminent departure to the server.
		@param client the same ClientLiaisonInterface that was originally obtained
		from the server via a call to register()
		@param message explaining why it is leaving the session
		*/
	public void resign(ClientLiaisonInterface client, String message) throws RemoteException;
	
	}
